<template>
  <div class="main">
    <div class="scheHeader">
      <h1 class="title">排班管理</h1>
    </div>
    <div class="scheBody">
      <div class="scheBodyLeft fl">
        <div class="scheNav">
          <el-menu default-active="2" class="el-menu-vertical-demo nav">
            <el-submenu index="1">
              <template slot="title">
                <i class="el-icon-location"></i>
                <span>导航一</span>
              </template>
              <el-menu-item-group>
                <template slot="title">分组一</template>
                <el-menu-item index="1-1">选项1</el-menu-item>
                <el-menu-item index="1-2">选项2</el-menu-item>
              </el-menu-item-group>
              <el-menu-item-group title="分组2">
                <el-menu-item index="1-3">选项3</el-menu-item>
              </el-menu-item-group>
              <el-submenu index="1-4">
                <template slot="title">选项4</template>
                <el-menu-item index="1-4-1">选项1</el-menu-item>
              </el-submenu>
            </el-submenu>
            <el-menu-item index="2" @click="toScheRule">
              <i class="el-icon-menu"></i>
              <span slot="title">排班规则管理</span>
            </el-menu-item>
            <el-menu-item index="3" @click="toScheFrom">
              <i class="el-icon-setting"></i>
              <span slot="title">排班表格</span>
            </el-menu-item>
            <el-menu-item index="4" @click="toScheManage">
              <i class="el-icon-setting"></i>
              <span slot="title">排班表格</span>
            </el-menu-item>
          </el-menu>
        </div>
      </div>
      <div class="scheBodyRight fl">
        <router-view></router-view>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: "schedule",
  methods: {
    toScheRule() {
      this.$router.push({
        name: "scherule",
      });
    },
    toScheFrom() {
      this.$router.push({
        name: "schefrom",
      });
    },
    toScheManage() {
      this.$router.push({
        name: "schemanage",
      });
    },
  },
};
</script>

<style scoped>
.main {
  margin: 50px;
  width: 85%;
  height: 660px;
  background-color: white;
  border-radius: 5px;
}
.scheHeader {
  height: 60px;
  padding: 0 40px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}
.title {
  line-height: 60px;
  font-style: 16px;
}

.scheBody {
  height: 600px;
}
.scheBodyLeft {
  height: 100%;
  width: 15%;
  /* border-right: 1px solid rgba(0, 0, 0, 0.1); */
}
.nav {
  height: 600px;
}

.scheBodyRight {
  width: 80%;
  padding: 20px;
}
</style>